.class public Lnbisdk/mu;
.super Ljava/lang/Object;


# instance fields
.field protected mListener:Lcom/nbi/common/NBIListener;

.field protected mRequest:Lcom/nbi/common/NBIRequest;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public constructor <init>(Lcom/nbi/common/NBIRequest;Lcom/nbi/common/NBIListener;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    iput-object p2, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    return-void
.end method

.method public static e(Lnbisdk/kw;)Lnbisdk/ri;
    .locals 3

    invoke-static {p0}, Lnbisdk/mu;->f(Lnbisdk/kw;)[B

    move-result-object v0

    new-instance v1, Lnbisdk/ri;

    const-string v2, "gps"

    invoke-direct {v1, v2}, Lnbisdk/ri;-><init>(Ljava/lang/String;)V

    const-string v2, "packed"

    invoke-virtual {v1, v2, v0}, Lnbisdk/ri;->c(Ljava/lang/String;[B)V

    return-object v1
.end method

.method public static f(Lnbisdk/kw;)[B
    .locals 9

    const-wide v7, 0x40efffe000000000L

    const-wide v3, 0x3ed680000003decbL

    const-wide/16 v5, 0x0

    const/16 v0, 0x13

    new-array v0, v0, [B

    invoke-interface {p0}, Lnbisdk/kw;->getTime()J

    move-result-wide v1

    long-to-int v1, v1

    const/4 v2, 0x0

    invoke-static {v1, v0, v2}, Lnbisdk/ah;->a(I[BI)V

    invoke-interface {p0}, Lnbisdk/kw;->getLatitude()D

    move-result-wide v1

    div-double/2addr v1, v3

    double-to-int v1, v1

    const/4 v2, 0x4

    invoke-static {v1, v0, v2}, Lnbisdk/ah;->a(I[BI)V

    invoke-interface {p0}, Lnbisdk/kw;->getLongitude()D

    move-result-wide v1

    div-double/2addr v1, v3

    double-to-int v1, v1

    const/16 v2, 0x8

    invoke-static {v1, v0, v2}, Lnbisdk/ah;->a(I[BI)V

    invoke-interface {p0}, Lnbisdk/kw;->getHeading()D

    move-result-wide v1

    const-wide v3, -0x3f70c80000000000L

    cmpl-double v3, v1, v3

    if-nez v3, :cond_0

    move-wide v1, v7

    :goto_0
    double-to-int v1, v1

    int-to-short v1, v1

    const/16 v2, 0xc

    invoke-static {v1, v0, v2}, Lnbisdk/ah;->a(S[BI)V

    invoke-interface {p0}, Lnbisdk/kw;->fX()D

    move-result-wide v1

    cmpg-double v3, v1, v5

    if-gez v3, :cond_1

    move-wide v1, v7

    :goto_1
    double-to-int v1, v1

    int-to-short v1, v1

    const/16 v2, 0xe

    invoke-static {v1, v0, v2}, Lnbisdk/ah;->a(S[BI)V

    invoke-interface {p0}, Lnbisdk/kw;->hJ()D

    move-result-wide v1

    const/16 v3, 0x10

    cmpg-double v1, v1, v5

    if-gez v1, :cond_2

    const-wide v1, 0x406fe00000000000L

    :goto_2
    double-to-int v1, v1

    int-to-byte v1, v1

    aput-byte v1, v0, v3

    const/16 v1, 0x11

    invoke-interface {p0}, Lnbisdk/kw;->hK()D

    move-result-wide v2

    invoke-static {v2, v3}, Lnbisdk/mu;->p(D)I

    move-result v2

    int-to-byte v2, v2

    aput-byte v2, v0, v1

    const/16 v1, 0x12

    invoke-interface {p0}, Lnbisdk/kw;->hL()D

    move-result-wide v2

    invoke-static {v2, v3}, Lnbisdk/mu;->p(D)I

    move-result v2

    int-to-byte v2, v2

    aput-byte v2, v0, v1

    return-object v0

    :cond_0
    const-wide v3, 0x3fd6800000000000L

    div-double/2addr v1, v3

    goto :goto_0

    :cond_1
    const-wide/high16 v3, 0x3fd0

    div-double/2addr v1, v3

    goto :goto_1

    :cond_2
    invoke-interface {p0}, Lnbisdk/kw;->hJ()D

    move-result-wide v1

    const-wide v4, 0x4016800000000000L

    div-double/2addr v1, v4

    goto :goto_2
.end method

.method public static p(D)I
    .locals 10

    const/4 v2, 0x0

    const-wide/16 v8, 0x0

    const/4 v0, -0x1

    cmpg-double v1, p0, v8

    if-gtz v1, :cond_1

    move v0, v2

    :cond_0
    :goto_0
    return v0

    :cond_1
    sget-object v1, Lnbisdk/kw;->pO:[D

    array-length v1, v1

    :goto_1
    const/4 v3, 0x2

    sub-int v3, v1, v3

    if-ge v2, v3, :cond_0

    sget-object v3, Lnbisdk/kw;->pO:[D

    aget-wide v3, v3, v2

    sget-object v5, Lnbisdk/kw;->pO:[D

    add-int/lit8 v6, v2, 0x1

    aget-wide v5, v5, v6

    cmpl-double v7, v3, v8

    if-lez v7, :cond_3

    cmpl-double v7, v5, v8

    if-lez v7, :cond_3

    cmpl-double v7, p0, v3

    if-ltz v7, :cond_3

    cmpg-double v7, p0, v5

    if-gtz v7, :cond_3

    sub-double v0, v3, p0

    invoke-static {v0, v1}, Ljava/lang/Math;->abs(D)D

    move-result-wide v0

    sub-double v3, v5, p0

    invoke-static {v3, v4}, Ljava/lang/Math;->abs(D)D

    move-result-wide v3

    cmpg-double v0, v0, v3

    if-gez v0, :cond_2

    move v0, v2

    goto :goto_0

    :cond_2
    add-int/lit8 v0, v2, 0x1

    goto :goto_0

    :cond_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_1
.end method


# virtual methods
.method public onRequestCancelled(Lcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    iget-object v1, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    invoke-interface {v0, v1}, Lcom/nbi/common/NBIListener;->onRequestCancelled(Lcom/nbi/common/NBIRequest;)V

    return-void
.end method

.method public onRequestComplete(Lcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    iget-object v1, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    invoke-interface {v0, v1}, Lcom/nbi/common/NBIListener;->onRequestComplete(Lcom/nbi/common/NBIRequest;)V

    return-void
.end method

.method public onRequestError(Lcom/navbuilder/nb/NBException;Lcom/navbuilder/nb/b;)V
    .locals 3

    iget-object v0, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    new-instance v1, Lcom/nbi/common/NBIException;

    invoke-direct {v1, p1}, Lcom/nbi/common/NBIException;-><init>(Ljava/lang/Object;)V

    iget-object v2, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    invoke-interface {v0, v1, v2}, Lcom/nbi/common/NBIListener;->onRequestError(Lcom/nbi/common/NBIException;Lcom/nbi/common/NBIRequest;)V

    return-void
.end method

.method public onRequestProgress(ILcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    iget-object v1, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    invoke-interface {v0, p1, v1}, Lcom/nbi/common/NBIListener;->onRequestProgress(ILcom/nbi/common/NBIRequest;)V

    return-void
.end method

.method public onRequestStart(Lcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    iget-object v1, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    invoke-interface {v0, v1}, Lcom/nbi/common/NBIListener;->onRequestStart(Lcom/nbi/common/NBIRequest;)V

    return-void
.end method

.method public onRequestTimedOut(Lcom/navbuilder/nb/b;)V
    .locals 2

    iget-object v0, p0, Lnbisdk/mu;->mListener:Lcom/nbi/common/NBIListener;

    iget-object v1, p0, Lnbisdk/mu;->mRequest:Lcom/nbi/common/NBIRequest;

    invoke-interface {v0, v1}, Lcom/nbi/common/NBIListener;->onRequestTimeOut(Lcom/nbi/common/NBIRequest;)V

    return-void
.end method
